From c72311d01a827a61d6d3d786416ddb442076d73a Mon Sep 17 00:00:00 2001
From: Sebastien Castiel <sebastien@castiel.me>
Date: Wed, 6 Dec 2023 12:39:54 -0500
Subject: Better loading behavior

---
 src/app/groups/[groupId]/layout.tsx | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

(limited to 'src/app/groups/[groupId]/layout.tsx')

diff --git a/src/app/groups/[groupId]/layout.tsx b/src/app/groups/[groupId]/layout.tsx
index f8030c6..438afea 100644
--- a/src/app/groups/[groupId]/layout.tsx
+++ b/src/app/groups/[groupId]/layout.tsx
@@ -15,13 +15,20 @@ export default async function GroupLayout({
   if (!group) notFound()
 
   return (
-    <main>
+    <>
       <div className="mb-4 flex justify-between">
         <Button variant="ghost" asChild>
           <Link href="/groups">
             <ChevronLeft className="w-4 h-4 mr-2" /> Back to recent groups
           </Link>
         </Button>
+      </div>
+
+      <div className="flex justify-between items-baseline mb-4">
+        <h1 className="font-bold text-2xl">
+          <Link href={`/groups/${groupId}`}>{group.name}</Link>
+        </h1>
+
         <Button variant="secondary" asChild>
           <Link href={`/groups/${groupId}/edit`}>
             <Edit className="w-4 h-4 mr-2" /> Edit group settings
@@ -29,9 +36,7 @@ export default async function GroupLayout({
         </Button>
       </div>
 
-      <h1 className="font-bold mb-4">{group.name}</h1>
-
       {children}
-    </main>
+    </>
   )
 }
-- 
cgit v1.3

